package com.yjhb.android.sbz.tool

import android.content.Context
import com.leon.channel.helper.ChannelReaderUtil

object ChannelUtil {

    /**
     * 获取当前APK的渠道名
     */
    fun getApkChannelName(context: Context): String? {
        var channel = ChannelReaderUtil.getChannel(context) ?: "官方渠道"
        when (channel) {
            "61650" -> channel = "应用宝"
        }
        return channel
    }

    /**
     * 获取当前APK的渠道号
     */
    fun getChannelNumber(context: Context): String? {
        var channel = ChannelReaderUtil.getChannel(context)
        when (channel) {
            //如果是以下渠道，不绑定上级渠道
            "61650" -> channel = null
        }
        return channel
    }


}